package com.guigu.order.feign;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guigu.tms.result.R;
import com.guigu.user.entity.query.AddressBookQuery;
import com.guigu.user.entity.vo.AddressBookVO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @ClassName:UserFegin
 * @Description:获取用户服务的地址信息
 * @Author:taoLong
 * @Date:2021/11/15:10:07 星期一
 * @email:2391611102@qq.com or 2391611102qq@gmail.com
 */
@FeignClient(name = "service-user", path = "/user/address-book")
public interface UserAddressFeign {
    /**
     * 根据用户id查询地址簿信息
     *
     * @param query    查询对象
     * @param pageSize 页数
     * @param pageNum  页码
     * @return
     */
    @PostMapping("/queryAddressBookBasedOnUserId/{pageSize}/{pageNum}")
    public R<Page<AddressBookVO>> queryAddressBookBasedOnUserId(@RequestBody AddressBookQuery query,
                                                                @PathVariable("pageSize") String pageSize,
                                                                @PathVariable("pageNum") String pageNum);
}
